package com.sxjh.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sxjh.entity.TestEntity;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

public interface TestMapper extends BaseMapper<TestEntity> {

  @Update("update test set count=count-1 where id = ${id} and count > 0")
  int updateByCount(@Param("id") Integer id);

}
